"Internal: Holds reference to which-key buffer.")
(defvar which-key--timer nil
"Internal: Holds reference to open window timer.")
+(defvar which-key--secondary-timer-active nil
+ "Internal: Non-nil if the secondary timer is active.")
(defvar which-key--paging-timer nil
"Internal: Holds reference to timer for paging.")
(defvar which-key--is-setup nil
which-key--current-show-keymap-name nil
which-key--prior-show-keymap-args nil
which-key--on-last-page nil)
- (when which-key-idle-secondary-delay
+ (when (and which-key-idle-secondary-delay
+ which-key--secondary-timer-active)
(which-key--start-timer))
(cl-case which-key-popup-type
;; Not necessary to hide minibuffer
(eq this-command 'god-mode-self-insert))
(null this-command)))
(which-key--create-buffer-and-show prefix-keys)
- (when which-key-idle-secondary-delay
- (which-key--start-timer which-key-idle-secondary-delay)))
+ (when (and which-key-idle-secondary-delay
+ (not which-key--secondary-timer-active))
+ (which-key--start-timer which-key-idle-secondary-delay t)))
((and which-key-show-operator-state-maps
(bound-and-true-p evil-state)
(eq evil-state 'operator)
;; Timers
-(defun which-key--start-timer (&optional delay)
+(defun which-key--start-timer (&optional delay secondary)
"Activate idle timer to trigger `which-key--update'."
(which-key--stop-timer)
+ (setq which-key--secondary-timer-active secondary)
(setq which-key--timer
(run-with-idle-timer
(if delay